import { type pageInfo } from '@/page/types/base/baseRequestPage'

export interface goodsBrandInfo {
  /**
   * id
   */
  id: string
  /**
   * 品牌名称
   */
  name: string
  /**
   * 品牌code
   */
  code: string
  /**
   * 品牌图片url
   */
  image: string
  /**
   * 品牌首字母
   */
  letter: string
}
export interface goodsBrandS extends pageInfo {
  /**
   * 品牌名称
   */
  name: string
  /**
   * 品牌code
   */
  code: string
  /**
   * 品牌首字母
   */
  letter: string
}
export class goodsBrandClass {
  goodsBrandTable = [] as goodsBrandInfo[]
  goodsBrandS: goodsBrandS = {
    name: '',
    code: '',
    letter: '',
    page: 1,
    size: 10,
    total: 0
  }
  goodsBrandEdit: goodsBrandInfo = {
    id: '',
    name: '',
    code: '',
    image: '',
    letter: ''
  }
  goodsBrandDialog = false
  goodsBrandRule = {
    name: [
      {
        required: true,
        message: '品牌名称不能为空',
        trigger: 'blur'
      }
    ],
    code: [
      {
        required: true,
        message: '品牌编码不能为空',
        trigger: 'blur'
      }
    ],
    letter: [
      {
        required: true,
        message: '品牌首字母不能为空',
        trigger: 'change'
      }
    ]
  }
  letters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
}
